<!--$Id: txn_abort.so,v 10.39 2004/08/13 03:39:03 bostic Exp $-->
<!--Copyright (c) 1997,2008 Oracle.  All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB: DbTxn::abort</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<table width="100%"><tr valign=top>
<td>
<b>DbTxn::abort</b>
</td>
<td align=right>
<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a>
<a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a></td>
</tr></table>
<hr size=1 noshade>
<tt>
<b><pre>
#include &lt;db_cxx.h&gt;
<p>
int
DbTxn::abort();
</pre></b>
<hr size=1 noshade>
<b>Description: DbTxn::abort</b>
<p>The DbTxn::abort method causes an abnormal termination of the transaction.
The log is played backward, and any necessary undo operations are done
through the <b>tx_recover</b> function specified to
<a href="../api_cxx/env_set_app_dispatch.html">DbEnv::set_app_dispatch</a>.  Before DbTxn::abort returns, any
locks held by the transaction will have been released.</p>
<p>In the case of nested transactions, aborting a parent transaction causes
all children (unresolved or not) of the parent transaction to be aborted.</p>
<p>All cursors opened within the transaction must be closed before the
transaction is aborted.</p>
<p>After DbTxn::abort has been called, regardless of its return, the
<a href="../api_cxx/txn_class.html">DbTxn</a> handle may not be accessed again.</p>
<p>The DbTxn::abort method
either returns a non-zero error value
or throws an exception that encapsulates a non-zero error value on
failure, and returns 0 on success.
</p>
<hr size=1 noshade>
<br><b>Class</b>
<a href="../api_cxx/env_class.html">DbEnv</a>, <a href="../api_cxx/txn_class.html">DbTxn</a>
<br><b>See Also</b>
<a href="../api_cxx/txn_list.html">Transaction Subsystem and Related Methods</a>
</tt>
<table width="100%"><tr><td><br></td><td align=right>
<a href="../api_cxx/api_core.html"><img src="../images/api.gif" alt="API"></a><a href="../ref/toc.html"><img src="../images/ref.gif" alt="Ref"></a>
</td></tr></table>
<p><font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
</body>
</html>
